# -*-coding: Utf-8 -*-
# @File : User .py
# author: Chimengmeng
# blog_url : https://www.cnblogs.com/dream-ze/
# Time：2023/10/9
from database.db import db
from sqlalchemy.ext.declarative import declarative_base

Base = declarative_base()


class User(Base):
    __tablename__ = 'user'
    user_id = db.Column(db.Integer, primary_key=True, autoincrement=True)
    user_name = db.Column(db.String(255), nullable=True, unique=True)
    user_password = db.Column(db.String(255), nullable=True)
    # histories = db.relationship('History', backref="user", lazy=True)

# class History(Base):
#     __tablename__ = 'history'
#     id = db.Column(db.Integer, primary_key=True, autoincrement=True)
#     price = db.Column(db.String(255), nullable=False)
#     user_id = db.Column(db.Integer, db.ForeignKey('user.user_id'), nullable=False)
